package cn.yanxiaohui.service.web.pattern.linked;

public class Factory {

    public static NodeHandler getFirstHandler(){
        NodeHandler one = new OneNodeHandler();
        NodeHandler two = new TwoNodeHandler();
        one.setNextHandler(two);
        NodeHandler three = new ThreeNodeHandler();
        two.setNextHandler(three);
        return one;
    }
}
